﻿@model AutomatedTestDataManagement.Models.TestStep

@{
    ViewBag.Title = "Delete";
}

<h2>Delete</h2>

<h3>Are you sure you want to delete this Test Step?</h3>
<fieldset>
    <legend>TestStep</legend>

    <div class="display-label">
         @Html.Label("Description")
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.StepDescription)
    </div>

    <div class="display-label">
         @Html.Label("Step Kind")
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.StepKind.StepKind1)
    </div>

    <div class="display-label">
         @Html.Label("Linked Data Record")
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.DataID)
    </div>
</fieldset>
@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    <div class="display-field">
        @Html.ValidationSummary(true)
        @if (ViewContext.ViewData.ModelState.IsValid)
        {
            <input type="submit" value="Delete" /> @Html.Encode(" | ")
            @Html.ActionLink("Back to List", "Index")
         }
         else
         {
            <table>
                <tr>
                    <th>Test Name</th>
                    <th>Test Description</th>
                    <th></th>
                </tr>
                @Html.EditorFor( m => m.TestTestSteps, new { DeleteFrom = Model.TestStepID })
            </table>
        }

    </div>
}
<div>
    @Html.Partial("_TestSuiteNav")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
